<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="${prefixPackage}.mapper.${javaNameBig}Mapper">
<#if !isSimple>
    <select id="listWithPage" resultType="${prefixPackage}.beans.vo.${javaNameBig}Vo">
        select t0.* from ${tbName} t0
        where del_flag = 0
<#list columnList as column>
    <#if column.name != 'id'
    && column.name != 'del_flag'
    && column.name != 'create_time'
    && column.name != 'create_by'
    && column.name != 'create_name'
    && column.name != 'update_time'
    && column.name != 'update_by'
    && column.name != 'create_name'
    && column.name != 'update_name'
    && column.javaType != 'Long'
    && column.javaType != 'BigDecimal'
    >
        <#if column.javaType == 'Integer' || column.javaType == 'Long'>
        <if test="param.${column.javaName} != null and param.${column.javaName} != ''">
            and ${column.name} = ${r'#{param.'}${column.javaName}}
        </if>
        </#if>
        <#if column.javaType == 'String'>
        <if test="param.${column.javaName} != null and param.${column.javaName} != ''">
            and ${column.name} like CONCAT('%', ${r'#{param.'}${column.javaName}}, '%')
        </if>
        </#if>
    </#if>
</#list>
    </select>
</#if>
</mapper>